if __name__ == '__main__':
    gather={(1,2,2),(1,2,3),(1,2,3)}
    gather1 = set()
    #gather.remove(1)
    gather.discard(1)
    print(gather)
    print(type(gather))
    print(type(gather1))
    gather1.add(11)
    print(gather1)
    gather1.update((1,2))
    gather1.update([3,4])
    print(gather1)
    print(gather.pop())
    print(gather)
    #1,列表
    list1 = [ i for i in range(6)]
    print(list1)
    list2 = [i for i in range(10) if i%2==1]
    print(list2)
    list3 = [(i,j) for i in range(1,5) for j in range(3)]
    print(list3)
    #2,字典推导式
    name =('zhangs','lis','wangw')
    age = ('18','16','20')
    dict1 = {name[i]:age[i] for i in range(len(name))}
    print(dict1)
    #3,集合
    set = {i for i in range(5)}
    set2 = {(i,j) for i in range(1,5) for j in range(3)}
    print('set',set)
    print('set2',set2)
    print(type(set))

#5!=5*4!
def f(n):
    if n == 1:
        return 1
    else:
        return n * f(n-1)

print(f(5))

#lambda简单表达式
def f(a,b):
    return a+b
f1 = lambda a,b : a+b
print(f1(2,2))